<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>扩展运算符</title>
</head>

<body>
  <script>
    const str = ['张三', '李四', '王五']; //=>'张三','李四','王五'
    function receive() {
      console.log(arguments);
    }

    receive(str); // 传递数组参数，arguments里面只有一个元素，即数组
    receive(...str); // 传递数组参数，arguments里面只有三个参数，即数组
    // 相当于 receive('张三','李四','王五');
  </script>
</body>

</html>